package com.huiminpay.merchant.convet;

import com.huiminpay.merchant.vo.MerchantRegisterVo;
import com.yh.huiminpay.merchant.dto.MerchantDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface MerchantCovert {
    MerchantCovert INSTANCE = Mappers.getMapper(MerchantCovert.class);

    MerchantDTO vo2dto(MerchantRegisterVo vo);
    MerchantRegisterVo dto2vo(MerchantDTO dto);

    List<MerchantDTO> listvodto(List<MerchantRegisterVo> list);
    List<MerchantRegisterVo> listVo(List<MerchantDTO> list);
    public  static  void main(String[] args ){
        MerchantRegisterVo merchantRegisterVo = new MerchantRegisterVo();
        merchantRegisterVo.setMobile("12344");
        merchantRegisterVo.setUsername("程帅兵");
        MerchantDTO merchantDTO=MerchantCovert.INSTANCE.vo2dto(merchantRegisterVo);
        merchantDTO.setId(77L);
        MerchantRegisterVo merchantRegisterVo1=MerchantCovert.INSTANCE.dto2vo(merchantDTO);

    }
}
